﻿// Copyright (c)  MOKEYISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

using System.Collections.Generic;
using NSQL.Generator;

namespace NSQL.Expressions
{
    public class ExpressionCollection : List<IExpression>, IExpressions
    {
        public T Accept<T>(IExpressionVisitor<T> visitor) => visitor.Visit(this);
        public T ToString<T>(IExpressionProcessor<T> processor) => processor.Process(this);
        public override string ToString() => SqlGenerator.Instance.Generate(this);

        public ExpressionCollection()
        {
        }

        public ExpressionCollection(IEnumerable<IExpression> collection) : base(collection)
        {
        }

        public object Tag { get; set; }
    }
}